<?php
     include('../lib/conn.php');

    $res = file_get_contents('php://input');

    $arr = json_decode($res);

    $username=$arr->username;
    $password=$arr->password;

    $sql = "select * from users where username='$username' and password='$password'";

    $res=$mysqli->query($sql);
    if($res->num_rows){
        echo '{"login":true}';
    }else{
        echo '{"login":false}';
    }
?>